<template>
	<!-- 质量监控 -->
	<view>
		<batch v-if="PageCur=='batch'" ></batch>
		<real v-if="PageCur=='real'" ></real>
		<total v-if="PageCur=='total'" ></total>
		<!-- 底部tab -->
		<view class="cu-bar tabbar bg-white shadow foot">
			<view class="action" @click="NavChange" data-cur="real">
				<view :class="['tab-icon-block', PageCur == 'real'?'bg-blue':'bg-white']">
					<text :class="['ph-shishizhiliangjiankong', 'font-size34', PageCur == 'real'?'text-white':'text-gray']"></text>
				</view>
				<view :class="PageCur=='real'?'text-blue':'text-gray'">实时质量监控</view>
			</view>
			<view class="action" @click="NavChange" data-cur="total">
				<view :class="['tab-icon-block', PageCur == 'total'?'bg-blue':'bg-white']">
					<text :class="['ph-zhiliangtongji', 'font-size34', PageCur == 'total'?'text-white':'text-gray']"></text>
				</view>
				<view :class="PageCur=='total'?'text-blue':'text-gray'">质量统计</view>
			</view>
			<view class="action" @click="NavChange" data-cur="batch">
				<view :class="['tab-icon-block', PageCur == 'batch'?'bg-blue':'bg-white']">
					<text :class="['ph-picizhiliangtongji', 'font-size34', PageCur == 'batch'?'text-white':'text-gray']"></text>
				</view>
				<view :class="PageCur=='batch'?'text-blue':'text-gray'">批次质量统计</view>
			</view>
		</view>
	</view>
</template>

<script>
	import batch from './batch/index'
	import real from './real/index'
	import total from './total/index'
	export default {
		components: {
			batch,
			real,
			total
		},
		data() {
			return {
				PageCur: 'real'
			}
		},
		methods: {
			NavChange: function(e) {
				this.PageCur = e.currentTarget.dataset.cur
			}
		}
	}
</script>

